<!DOCTYPE html >
<html>
<head>
    <base>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>订单审核详细</title>
    <link rel="stylesheet" href="../../../res/layui/css/layui.css" media="all">

</head>
<body>
<table class="layui-hide" id="goods" lay-filter="demo"></table>


<script src="../../../res/layui/layui.js"></script>
<script src="../../../res/js/jquery-3.4.1.min.js"></script>
<script src="../../../res/js/util.js"></script>
<script>
    var arr = "";
    layui.use(['laydate', 'laypage', 'layer', 'table', 'upload', 'element'], function(){
        var laydate = layui.laydate //日期
            ,laypage = layui.laypage //分页
        layer = layui.layer //弹层
            ,table = layui.table //表格
            ,upload = layui.upload //上传
            ,element = layui.element; //元素操作

        //监听Tab切换
        element.on('tab(demo)', function(data){
            layer.msg('切换了：'+ this.innerHTML);
            console.log(data);
        });
        //执行一个 table 实例
        table.render({
            elem: '#goods'
            ,url: getRootPath()+'auditRecord/rawMaterialShowAll' //数据接口
            ,page: true //开启分页
            ,method:'post'
            ,cols: [[ //表头
                {type:'checkbox', fixed: 'left'}
                ,{field: 'reviewId', title: '审核Id', width:120, fixed: 'left',align:"center"}
                ,{field: 'reviewState', title: '审核状态', width:180,align:"center",templet:function (d) {
                        if (d.reviewState == '10') {
                            return '<p class="layui-btn layui-btn-danger layui-btn-xs">未申请</p>';
                        } else if (d.reviewState == '20') {
                            return '<p class="layui-btn layui-btn-warm layui-btn-xs">已申请</p>';
                        } else if (d.reviewState == '60') {
                            return '<p class="layui-btn layui-btn-warm layui-btn-xs">总公司总经理通过</p>';
                        } else if (d.reviewState == '61') {
                            return '<p class="layui-btn layui-btn-danger layui-btn-xs">总公司总经理不通过</p>';
                        } else if (d.reviewState == '91') {
                            return '<p class="layui-btn layui-btn-warm layui-btn-xs">已入库</p>';
                        } else if (d.reviewState == '68') {
                            return '<p class="layui-btn layui-btn-warm layui-btn-xs">等待财务审核</p>';
                        } else if (d.reviewState == '70') {
                            return '<p class="layui-btn layui-btn-warm layui-btn-xs">总公司财务审核通过</p>';
                        } else if (d.reviewState == '71') {
                            return '<p class="layui-btn layui-btn-warm layui-btn-xs">总公司财务审核不通过</p>';
                        }
                    }}
                ,{field: 'reviewRemark', title: '审核说明', width:150,align:"center"}
                ,{field: 'reviewTime', title: '审核时间', width:180,align:"center"}
                ,{field: 'operator', title: '审核人', width: 120,align:"center"}
            ]]
            ,id: 'testReload'
            ,where: {
                businessId:getQueryString("purchaseId")
            }
        });
    });
</script>
</body>
</html>